package com.mx.tool.form.window.website;

import javax.swing.*;

import static com.mx.tool.enums.WebsiteEnum.*;

/**
 * @Author: 徐建鹏.
 * @create: 2021-11-11 10:37
 * @Description:
 */
public class CommonWindow extends WebsiteWindow {
    private JPanel jPanel;
    private JButton bdButton;
    private JButton googleButton;
    private JButton giteeButton;
    private JButton githubButton;
    private JButton csdnButton;
    private JButton bkyButton;
    private JButton stackoverflowButton;
    private JButton beJsonButton;
    private JButton wxpayButton;
    private JButton wxgzhButton;
    private JButton wxxcxButton;
    private JButton alpayButton;
    private JButton dyButton;
    private JButton mvnrepositoryButton;

    public JPanel getContent() {
        return jPanel;
    }

    public CommonWindow() {
        bdButton.addActionListener(e -> openUrl(BAIDU.value()));
        googleButton.addActionListener(e -> openUrl(GOOGLE.value()));
        giteeButton.addActionListener(e -> openUrl(GITEE.value()));
        githubButton.addActionListener(e -> openUrl(GITHUB.value()));
        csdnButton.addActionListener(e -> openUrl(CSDN.value()));
        bkyButton.addActionListener(e -> openUrl(BKY.value()));
        stackoverflowButton.addActionListener(e -> openUrl(STACKOVERFLOW.value()));
        beJsonButton.addActionListener(e -> openUrl(BEJSON.value()));
        wxpayButton.addActionListener(e -> openUrl(WXPAY.value()));
        wxgzhButton.addActionListener(e -> openUrl(WXGZH.value()));
        wxxcxButton.addActionListener(e -> openUrl(WXXCX.value()));
        alpayButton.addActionListener(e -> openUrl(ALPAY.value()));
        dyButton.addActionListener(e -> openUrl(DY.value()));
        mvnrepositoryButton.addActionListener(e -> openUrl(MVN_REPOSITORY.value()));
    }

}
